
ReadME for Replication Files for "Redistribution under Spatial Inequality"
Journal of Politics

August 18, 2023

Andreas Wiedemann
Princeton University
awiedemann@princeton.edu

Computing environment

R version 4.3.1 (2023-06-16)Platform: aarch64-apple-darwin20 (64-bit)Running under: macOS Ventura 13.5

R packages:
lme4_1.1-34
msm_1.7
janitor_2.2.0
ggrepel_0.9.3
viridis_0.6.4
viridisLite_0.4.2
plyr_1.8.8
sf_1.0-14
lfe_2.9-0
ineq_0.2-13
survey_4.2-1     Matrix_1.6-0
haven_2.5.3
BBmisc_1.13
stargazer_5.2.3
AER_1.2-10
survival_3.5-5
sandwich_3.0-2
lmtest_0.9-40
zoo_1.8-12
car_3.1-2
carData_3.0-5    reshape2_1.4.4
boot_1.3-28.1
lubridate_1.9.2
forcats_1.0.0
stringr_1.5.0
dplyr_1.1.2
purrr_1.0.2
readr_2.1.4
tidyr_1.3.0
tibble_3.2.1
tidyverse_2.0.0  binsreg_1.0
ggplot2_3.4.2
data.table_1.14.8

### List of files:

Folder hierarchy
	data (contains all data files)
	code (contains all R scripts)
	out (holder for all tables and figures produced by the code)
	

### DOCUMENTATION

readme.txt -- This file, which lists all files and computing environment dependencies necessaryto verify the results from this manuscript

codebook.pdf -- combined codebook for all data files


### DATA FILES

bes.RData: 		This file contains extracts from the British Election Study
cmp.RData		This file contains extracts from the Comparative Manifesto Project Data
cpds.RData		This file contains extracts from the Comparative Political Dataset
elections.RData		This file contains UK general election outcomes at the parliamentary constituency level
ess9_ml.RData		This file contains extracts from the European Social Survey Wave 9 Multilevel file
imd.RData		This file contains data from the Multiple Indeces of Deprivation Data
inc_comb.RData		This file contains data on regional incomes from the EU, US, and UK
oecd_rwb.RData		This file contains data from the OECD on regional inequality and related variables
pcon_covars.RData	This file contains social and economic variables at the UK parliamentary constituency level
turnout.RData		This file contains data on electoral turnout from International IDEA
wb.RData		This file contains unemployment data and GDP data from the World Bank


Folder "shapefiles/pcon_shp"		This folder contains boundary shapefiles for parliamentary constituencies
	Westminster_Parliamentary_Constituencies__December_2017__Boundaries_UK.shx	Westminster_Parliamentary_Constituencies__December_2017__Boundaries_UK.prj	Westminster_Parliamentary_Constituencies__December_2017__Boundaries_UK.shp	Westminster_Parliamentary_Constituencies__December_2017__Boundaries_UK.dbf	Westminster_Parliamentary_Constituencies__December_2017__Boundaries_UK.cpg


### CODE

Use the four scripts in the folder "Code" to reproduce all other figures and tables in the main text and appendix. Set your working directory to the "replication_files" folder. The scripts include all relevant packages, including installation commands, to run the code. The scripts draw on the datasets in the "Data" folder and save figures and intermediate data tables in the "Output" folder as follows:

01_inequality.R: this script produces the following figures and tables:
	Figure 3a
	Figure 3b
	SI Table B1
	SI Table B2
	SI Table B3
	SI Figure B1a
	SI Figure B1b


02_oecd.R: this script produces the following figures, tables, and datasets
	Table 1
	Figure 2
	Figure 1
	SI Table A1
	SI Table A3
	SI Table A4
	SI Table A5
	SI Table A10
	SI Table B9
	SI Table C2
	SI Figure A1


03_bes.R: this script produces the following tables:
	Table 2
	Figure 6
	SI Figure B2
	SI Figure B3
	SI Figure 5a
	SI Figure 5b
	SI Table B4
	SI Table B5
	SI Table B7
	SI Table B8


04_maps.R: this script produces the following figure:
	Figure 4


04_plots_elections.R: this script produces the following figure and table:
	Figure 7
	Table 3


05_manifesto.R: this script produces the following figures and tables:
	Table 4
	Figure 8
	SI Table E1
	SI Table E2


06_regional_income.R: this script produces the following figures and tables:
	SI Figure D1
	SI Figure D2a
	SI Figure D2b


07_ess.R: this script produces the following figures and tables:
	SI Table C1
	SI Table C2

